<template>
  <el-row
    type="flex"
    justify="center"
    align="middile"
    style="width:100%;"
  >
    <el-col>{{ data.name }}</el-col>
    <el-col style="width:150px">
      <el-row type="flex" justify="end" style="width:100%">
        <el-col>{{ data.manager }}</el-col>
        <el-col>
          <el-dropdown>
            <span class="el-dropdown-link">
              操作<i class="el-icon-arrow-down el-icon--right" />
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>添加子部门</el-dropdown-item>
              <el-dropdown-item v-if="!isRoot">查看部门</el-dropdown-item>
              <el-dropdown-item v-if="!isRoot">删除部门</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </el-col>
      </el-row>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      required: true
    },
    isRoot: {
      type: Boolean
    }
  }

}
</script>

<style>

</style>
